package com.xiaoy.core.side4.action;

import java.util.Map;

import javax.annotation.Resource;

import org.apache.struts2.convention.annotation.Namespace;
import org.apache.struts2.convention.annotation.Results;
import org.springside.modules.web.Servlets;

import com.xiaoy.core.side4.service.StudentService;
import com.xiaoy.web.BasicAction;


@Namespace("/side")
@Results( {
	
})
public class StudentAction extends BasicAction{
	
	@Resource(name="studentService")
	private StudentService service;
	
	public String list () {
		
		Map<String, Object> searchParams = Servlets.getParametersStartingWith(request, "search_");

		System.out.println("searchParams-->"+searchParams);
		System.out.println("studentService->"+service);
		request.setAttribute("pageList", service.filter(searchParams));
		
		return "list";
	}
	
	public String update () {
		

		request.setAttribute("pageList", "pageList");
		return "update";
	}
}
